package DBClasses;

import java.util.Calendar;
import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class GameComment {

	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;
	public Long getId() {
        return id;
    }
	
	@Persistent
	private String text;
	public String getText() {
        return text;
    }
	
	@Persistent
	private String author;
	public String getAuthor() {
        return author;
    }
	
	@Persistent
	private Long game;
	public Long getGame() {
        return game;
    }
	
	@Persistent
	private Date post_date;
	public Date getPostDate() {
        return post_date;
    }
	
	public GameComment(String text, String author, Long game) {
        this.text = text;
        this.author = author;
        this.game = game;
        this.post_date = Calendar.getInstance().getTime();
    }
}
